"""
Setup configuration for chunk_demo package
"""

from setuptools import setup, find_packages
import os

# Read the README file
def read_readme():
    with open("README.md", "r", encoding="utf-8") as fh:
        return fh.read()

# Read requirements
def read_requirements():
    with open("requirements.txt", "r", encoding="utf-8") as fh:
        return [line.strip() for line in fh if line.strip() and not line.startswith("#")]

# Package metadata
NAME = "chunk-demo"
VERSION = "1.0.0"
DESCRIPTION = "Comprehensive text chunking demonstration package"
AUTHOR = "Chunk Demo Team"
AUTHOR_EMAIL = "demo@example.com"
URL = "https://github.com/example/chunk-demo"
LICENSE = "MIT"

# Package configuration
setup(
    name=NAME,
    version=VERSION,
    description=DESCRIPTION,
    long_description=read_readme(),
    long_description_content_type="text/markdown",
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    url=URL,
    license=LICENSE,
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        # Core dependencies
        "numpy>=1.21.0",
        "pandas>=1.3.0",
        "scikit-learn>=1.0.0",
        "matplotlib>=3.5.0",
        "seaborn>=0.11.0",
        "nltk>=3.6.0",
        "spacy>=3.4.0",
        "regex>=2021.8.3",
        "psutil>=5.8.0",
        "tqdm>=4.62.0",
        "joblib>=1.1.0",
        "pydantic>=1.8.0",
        "lxml>=4.6.0",
        "beautifulsoup4>=4.9.0",
        "markdown>=3.3.0",
    ],
    extras_require={
        "deep-learning": [
            "torch>=1.10.0",
            "transformers>=4.15.0",
            "sentence-transformers>=2.2.0",
            "tensorflow>=2.8.0",
            "keras>=2.8.0",
        ],
        "document-processing": [
            "PyPDF2>=3.0.0",
            "python-docx>=0.8.11",
            "python-pptx>=0.6.21",
            "openpyxl>=3.0.0",
            "PyYAML>=6.0",
        ],
        "nlp": [
            "spacy>=3.4.0",
            "nltk>=3.6.0",
            "jieba>=0.42.1",
        ],
        "graph": [
            "networkx>=2.6.0",
            "python-louvain>=0.16",
        ],
        "reinforcement": [
            "gym>=0.21.0",
            "stable-baselines3>=1.6.0",
        ],
        "dev": [
            "pytest>=6.2.0",
            "pytest-cov>=2.12.0",
            "black>=21.9.0",
            "flake8>=3.9.0",
            "mypy>=0.910",
            "sphinx>=4.2.0",
            "sphinx-rtd-theme>=1.0.0",
        ],
        "all": [
            "torch>=1.10.0",
            "transformers>=4.15.0",
            "sentence-transformers>=2.2.0",
            "tensorflow>=2.8.0",
            "keras>=2.8.0",
            "PyPDF2>=3.0.0",
            "python-docx>=0.8.11",
            "python-pptx>=0.6.21",
            "openpyxl>=3.0.0",
            "PyYAML>=6.0",
            "networkx>=2.6.0",
            "python-louvain>=0.16",
            "gym>=0.21.0",
            "stable-baselines3>=1.6.0",
        ],
    },
    python_requires=">=3.7",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        "Topic :: Text Processing :: Linguistic",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    keywords="text chunking, nlp, artificial intelligence, machine learning, text processing",
    project_urls={
        "Bug Reports": "https://github.com/example/chunk-demo/issues",
        "Source": "https://github.com/example/chunk-demo",
        "Documentation": "https://chunk-demo.readthedocs.io/",
    },
    entry_points={
        "console_scripts": [
            "chunk-demo=chunk_demo.__main__:main",
        ],
    },
    zip_safe=False,
)